using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class u1000_node2Map : EntityTypeConfiguration<u1000_node2>
    {
        public u1000_node2Map()
        {
            // Primary Key
            this.HasKey(t => t.d_w_node_id);

            // Properties
            this.Property(t => t.node_name)
                .IsRequired()
                .HasMaxLength(64);

            this.Property(t => t.node_contact_phone)
                .HasMaxLength(32);

            this.Property(t => t.node_desc)
                .HasMaxLength(1024);

            this.Property(t => t.node_manager)
                .HasMaxLength(20);

            this.Property(t => t.source_id)
                .HasMaxLength(20);

            this.Property(t => t.reserv_1)
                .HasMaxLength(20);

            this.Property(t => t.reserv_2)
                .HasMaxLength(20);

            this.Property(t => t.reserv_3)
                .HasMaxLength(20);

            this.Property(t => t.reserv_4)
                .HasMaxLength(20);

            this.Property(t => t.reserv_5)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("u1000_node2");
            this.Property(t => t.d_w_node_id).HasColumnName("d_w_node_id");
            this.Property(t => t.node_cd).HasColumnName("node_cd");
            this.Property(t => t.node_name).HasColumnName("node_name");
            this.Property(t => t.node_contact_phone).HasColumnName("node_contact_phone");
            this.Property(t => t.node_desc).HasColumnName("node_desc");
            this.Property(t => t.node_manager).HasColumnName("node_manager");
            this.Property(t => t.node_level).HasColumnName("node_level");
            this.Property(t => t.node_type).HasColumnName("node_type");
            this.Property(t => t.business_load_dt).HasColumnName("business_load_dt");
            this.Property(t => t.data_load_dt).HasColumnName("data_load_dt");
            this.Property(t => t.source_id).HasColumnName("source_id");
            this.Property(t => t.effective_start_dt).HasColumnName("effective_start_dt");
            this.Property(t => t.effective_end_dt).HasColumnName("effective_end_dt");
            this.Property(t => t.reserv_1).HasColumnName("reserv_1");
            this.Property(t => t.reserv_2).HasColumnName("reserv_2");
            this.Property(t => t.reserv_3).HasColumnName("reserv_3");
            this.Property(t => t.reserv_4).HasColumnName("reserv_4");
            this.Property(t => t.reserv_5).HasColumnName("reserv_5");
        }
    }
}
